Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(insights): rename resource module to asset module #70951

Merged
merged 28 commits into from
May 29, 2024

Conversation

DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented May 15, 2024

Renaming the resources module to assets resonates better with FE devs. This does all the renaming in sentry itself, and there's another PR up for docs getsentry/sentry-docs#10047

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 15, 2024
Copy link

codecov bot commented May 15, 2024

Bundle Report

Changes will increase total bundle size by 6.09kB ⬆️

Bundle name Size Change
app-webpack-bundle-array-push 27.9MB 6.09kB ⬆️

Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 67.50000% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 77.90%. Comparing base (ed24aa9) to head (e8d0619).
Report is 8 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #70951       +/-   ##
===========================================
+ Coverage   64.59%   77.90%   +13.31%     
===========================================
  Files        6520     6548       +28     
  Lines      291600   291902      +302     
  Branches    50418    50424        +6     
===========================================
+ Hits       188350   227420    +39070     
+ Misses      96767    58232    -38535     
+ Partials     6483     6250      -233     
Files Coverage Δ
static/app/components/sidebar/index.tsx 80.57% <100.00%> (+0.14%) ⬆️
.../app/views/performance/browser/resources/index.tsx 100.00% <100.00%> (ø)
...pp/views/performance/browser/resources/settings.ts 100.00% <100.00%> (ø)
...rmance/landing/widgets/components/widgetHeader.tsx 100.00% <100.00%> (ø)
.../performance/landing/widgets/widgetDefinitions.tsx 100.00% <100.00%> (ø)
...tic/app/views/performance/utils/useModuleTitle.tsx 100.00% <100.00%> (ø)
...tatic/app/views/performance/utils/useModuleURL.tsx 94.73% <100.00%> (+0.98%) ⬆️
...ents/events/interfaces/spans/spanSummaryButton.tsx 58.82% <66.66%> (+1.68%) ⬆️
...e/browser/resources/resourceView/resourceTable.tsx 56.45% <66.66%> (+0.51%) ⬆️
...tionSummary/transactionSpans/spanDetails/utils.tsx 68.75% <0.00%> (ø)
... and 3 more

... and 1678 files with indirect coverage changes

export const BASE_URL = 'browser/resources';
export const DATA_TYPE = t('Asset'); // Name of the data shown (singular)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had trouble finding a decent name for this, but its a variable that represents the singular version of the type of data on the page. It maps to the span, i.e were showing Asset spans in this module

Comment on lines 1511 to 1526
<Route path={`${PERFORMANCE_MODULE_BASE_URLS[ModuleName.RESOURCE]}/`}>
<IndexRoute
component={make(
() => import('sentry/views/performance/browser/resources/index')
)}
/>
<Route
path="spans/span/:groupId/"
component={make(
() =>
import(
'sentry/views/performance/browser/resources/resourceSummaryPage/index'
)
)}
/>
</Route>
Copy link
Contributor Author

@DominikB2014 DominikB2014 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/browser/assets and /browser/resources will just route to the same component so we don't have to rely on the organization to setup routes

Comment on lines +9 to +14
export const PERFORMANCE_MODULE_TITLE = t('Resources');
export const PERFORMANCE_BASE_URL = 'browser/resources';
export const PERFORMANCE_DATA_TYPE = t('Resource');
export const PERFORMANCE_MODULE_DESCRIPTION = t(
'Find large and slow-to-load resources used by your application and understand their impact on page performance.'
);
Copy link
Contributor Author

@DominikB2014 DominikB2014 May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefixed with Performance so that once we move to insights, we just delete these and it all makes sense still. If we prefixed with insights, we would either have to live with it, or refactor this variable.

Copy link
Member

@gggritso gggritso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Two nits on confusing conditionals, otherwise LGTM!

static/app/views/performance/utils/useModuleURL.tsx Outdated Show resolved Hide resolved
static/app/views/performance/utils/useModuleTitle.tsx Outdated Show resolved Hide resolved
static/app/components/sidebar/index.tsx Outdated Show resolved Hide resolved
Co-authored-by: George Gritsouk <[email protected]>
@DominikB2014 DominikB2014 marked this pull request as ready for review May 29, 2024 21:02
@DominikB2014 DominikB2014 requested review from a team as code owners May 29, 2024 21:02
@DominikB2014 DominikB2014 enabled auto-merge (squash) May 29, 2024 21:14
@DominikB2014 DominikB2014 merged commit e9472ff into master May 29, 2024
42 checks passed
@DominikB2014 DominikB2014 deleted the DominikB2014/change-naming-assets branch May 29, 2024 22:29
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants